import { http } from '@/utils/http'

export const postMemberCartAPI = (data) => {
  return http({
    method: 'POST',
    url: '/member/cart',
    data,
  })
}

export const getMemberCartAPI = () => {
  return http({
    method: 'GET',
    url: '/member/cart',
  })
}

export const deleteMemberCartAPI = (data) => {
  return http({
    method: 'DELETE',
    url: '/member/cart',
    data,
  })
}

export const putMemberCartBySkuIdAPI = (skuId, data) => {
  return http({
    method: 'PUT',
    url: `/member/cart/${skuId}`,
    data,
  })
}

export const putMemberCartSelectedAPI = (data) => {
  return http({
    method: 'PUT',
    url: '/member/cart/selected',
    data,
  })
}
